package cn.exrick.xboot.modules.activiti.controller.business;


import cn.exrick.xboot.common.utils.PageUtil;
import cn.exrick.xboot.common.utils.ResultUtil;
import cn.exrick.xboot.common.vo.PageVo;
import cn.exrick.xboot.common.vo.Result;
import cn.exrick.xboot.common.vo.SearchVo;
import cn.exrick.xboot.modules.Information.entity.Information;
import cn.exrick.xboot.modules.activiti.entity.ActBusiness;
import cn.exrick.xboot.modules.activiti.entity.business.Workorder;
import cn.exrick.xboot.modules.activiti.service.RierTaskService;
import cn.exrick.xboot.modules.base.entity.Department;
import cn.exrick.xboot.modules.base.entity.Role;
import cn.exrick.xboot.modules.base.entity.User;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

/**
 * @author lyg
 */
@Slf4j
@RestController
@Api(description = "巡河任务接口")
@RequestMapping("/xboot/rierTask")
@Transactional
public class RierTaskController {

    @Autowired
    RierTaskService   riertaskService;
    @RequestMapping(value = "/getRierTaskList", method = RequestMethod.GET)
    @ApiOperation(value = "多条件分页获取巡河任务列表")
    public Result<IPage<Map>> getByCondition(@RequestParam Map<String,Object> map,
                                             @ModelAttribute SearchVo searchVo,
                                             @ModelAttribute PageVo pageVo){
        IPage<Map> mapIPage = riertaskService.selectAll(map,searchVo,pageVo);
        System.out.println(mapIPage);
        return new ResultUtil<IPage<Map>>().setData(mapIPage);
    }
}
